package com.zjz.myrule;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: zjz
 * @Date: 2021/10/05/17:23
 * @Description:
 * @Target:
 */

@Configuration
public class zjzRule {
    @Bean
    public IRule myRule(){
        return new zjzRandomRule(); // 默认是轮询,现在我们自定义为zjzRandomRule
    }


}
